// assertbas.h
// Layer of assert.h.

#include "stddef.h"

#ifdef assert
    #undef assert
#endif

#define assert(x)               asrtbas_assert(x, #x, "",  __FILE__, __LINE__)
#define assert_error()          assert(0)
#define default_error()         default: assert(0)
#define assert_no_null(x)       assert(x != NULL)
//#define assert_no_null(x,msg)   assert(x != NULL, msg)
//#define assert_return_error(type) assert(0); return (type)0
#define assert_message(x,msg)   asrtbas_assert(x, #x, msg, __FILE__, __LINE__);
//#define assert_with_message(x, message) asrtbas_assert(x, message, __FILE__, __LINE__);

#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */

void asrtbas_assert(int expr, const char* txtExpr, const char* msg, const char* file, int line);

void asrtbas_internal_warning( const char* message );

#ifdef __cplusplus
}
#endif /* __cplusplus */
